<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>
<h1>教务系统</h1>
<h2>课程管理</h2>
<a th:href="@{/courses}">查询</a>
<a th:href="@{/addcoursepage}">添加</a>
<table border="1">
    <tr>
        <td>课程号</td>
        <td>课程名</td>
        <td>删除操作</td>
        <td>更新操作</td>
        <td>本课程学生选课情况</td>
    </tr>
    <tr th:each="course:${courses}">
        <td th:text="${course.id}"></td>
        <td th:text="${course.name}"></td>
        <td>
            <a th:href="@{/deletecourse/{id}(id=${course.id})}">删除</a>
        </td>
        <td >
            <a th:href="@{/updatecoursepage/{id}(id=${course.id})}">更新</a>
        </td>
        <td>
            <a th:href="@{/getCourseStudentDetailsPage/{id}(id=${course.id})}">查询</a>
        </td>
    </tr>
</table>
</body>
</html>